﻿/***********************************************************************
 * <copyright file="IRoleRepository.cs" company="B/S JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   Hoang Bich Son 
 * Email:    sonhb@newman.vn
 * Website:
 * Create Date: Saturday, March 29, 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System.Collections.Generic;
using DXWebApplication.SecurityServiceReference;

namespace DXWebApplication.Repositories.Core.Security
{
    /// <summary>
    /// IRoleRepository interface
    /// </summary>
    public interface IRoleRepository:IRepository<RoleDto>
    {
        /// <summary>
        /// Gets the by user identifier.
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <returns></returns>
        string[] GetByUserId(int? id);

        /// <summary>
        /// Gets the role in site.
        /// </summary>
        /// <param name="siteId">The site identifier.</param>
        /// <returns></returns>
        List<RoleInSiteDto> GetRoleInSite(int siteId);

        /// <summary>
        /// Grants the role permission.
        /// </summary>
        /// <param name="roleId">The role identifier.</param>
        /// <param name="dtos">The dtos.</param>
        /// <returns></returns>
        string AssignToRole(int roleId,List<RoleInSiteDto> dtos);
    }
}